from app import db


class Teilehist(db.Model):
    __bind_key__ = 'ALS_NEP_Production'
    __tablename__ = 'TEILEHIST'
    DMCODE = db.Column(db.String(16), primary_key=True)
    PROZESSID = db.Column(db.Integer, primary_key=True)
    RTN = db.Column(db.String(8), primary_key=True)
    AKZ = db.Column(db.String(8), primary_key=True)
    ZEITPUNKT = db.Column(db.DateTime)
    AZEIT = db.Column(db.DateTime)
    STATUSID = db.Column(db.Integer)

    def __repr__(self):
        return '<TEILEHIST %r>' % self.PROZESSID
